package com.hzya.frame.hr.staff.service.impl; 
import com.hzya.frame.system.user.entity.UserEntity;
import com.hzya.frame.utils.core.action.SessionContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hzya.frame.hr.staff.entity.StaffEntity;
import com.hzya.frame.hr.staff.service.IStaffService;
import com.hzya.frame.hr.staff.dao.IStaffDao;
import com.hzya.frame.utils.core.service.BaseService;

import java.util.List;

/**
 * @description: 员工管理  service
 * @tableName:   hr_staff 
 * @entityName:  StaffEntity
 * @author: 	 gjh
 * @history:	 1.0
 */
@Service(value="hr_staffService")
public class  StaffServiceImpl extends BaseService< StaffEntity,Long> implements IStaffService{
	
	protected IStaffDao  staffDao;
	
	@Autowired
	public void setStaffDao(IStaffDao dao) {

		this.staffDao = dao;
		this.dao=dao;
	}

	@Override
	public List<StaffEntity> listGetOrgStaff() {
		UserEntity userEntity = SessionContext.getCurrentUser();
		StaffEntity entity = new StaffEntity();
		entity.setCompany_org_id(userEntity.getCompany_org_id());
		List <StaffEntity> staffEntityList = staffDao.query(entity);
		return staffEntityList;
	}
}
